import {useState, useEffect } from 'react'
const Brand = () => {
  const [count, setCount] = useState(0)

  useEffect(() => {
     console.log('3')
  }, [])

  useEffect(() => {
     console.log('2')
  }, [count])

  useEffect(() => {
    console.log('4')
    return () => {
      console.log('1')
    }
  }, [])

  return <div>Login
    <button onClick={() => {
      setCount(count+1)
    }}>按钮</button>
  </div>
}

export default Brand;
